package com.joker.aigc.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.joker.aigc.domain.entity.User;
import com.joker.aigc.domain.entity.UserFriend;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @author 20346
 * @description 针对表【user_friend(用户联系人表)】的数据库操作Mapper
 * @createDate 2023-12-17 11:26:08
 * @Entity com.joker.aigc.modules.chat.domain.entity.UserFriend
 */
@Mapper
public interface UserFriendMapper extends MPJBaseMapper<UserFriend> {

    @Select("select u.* from user_friend  f left join user u on u.id=f.friend_uid where f.uid=#{uid} and f.status=1 and f.is_delete=0")
    List<User> queryUserFriend(@Param("uid") Long uid);

}




